package com.glut.forum.bean.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * <p>
 * 文章表
 * </p>
 *
 * @author jobob
 * @since 2021-09-02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class TbArticle extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "item_id", type = IdType.AUTO)
    private Integer itemId;

    private String itemCode;

    /**
     * 连接user表的itemCode
     */
    private String userCode;

    /**
     * 文章标题
     */
    private String title;

    /**
     * 文章内容
     */
    private String content;

    /**
     * 用户名
     */
    private String creator;

    /**
     * 状态（0 草稿，1 已发布待审核， 2 审核失败已被驳回， 3审核通过发布成功）
     */
    private Integer state;

    /**
     * 文章标签
     */
    private String label;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;


}
